﻿using AutoMapper;
using QuarryPlanner.Domain.DTOs;
using QuarryPlanner.Domain.Entities;

namespace QuarryPlanner.Domain.Config
{
    // Author: Ryan Redburn
    // Created: 10/8/2014

    #region [ Updates ]

    // Author: Ryan Redburn
    // Date: 11/5/2014
    // Revision: Added type map for MobileVehicleExam. Removed sealed attribute.

    // Author: Ryan Redburn
    // Date: 11/5/2014
    // Revision: Added tytpe map for WorkPlaceExam.

    #endregion

    /// <summary>
    /// Class used to configure type maps for QuarryPlanner.Domain
    /// </summary>
    public static class DomainMapConfig
    {
        #region [ Methods ]

        /// <summary>
        /// Creates type maps for QuarryPlanner.Domain; this is required in order to utilize this library.
        /// </summary>
        public static void Initialize()
        {
            Mapper.CreateMap<QuarryHours, QuarryHoursDTO>();
            Mapper.CreateMap<QuarryHoursDTO, QuarryHours>();

            Mapper.CreateMap<MobileVehicleExam, MobileVehicleExamDTO>();
            Mapper.CreateMap<MobileVehicleExamDTO, MobileVehicleExam>();

            Mapper.CreateMap<WorkPlaceExam, WorkPlaceExamDTO>();
            Mapper.CreateMap<WorkPlaceExamDTO, WorkPlaceExam>();
        }

        #endregion
    }
}
